﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    //进货订单主表
    public class OmPurchaseOrder
    {
        public long UpOrderId { get; set; }
        public long UpReturnId { get; set; }
        public string UpOrderNo { get; set; }
        public long SupplierId { get; set; }
        public string OrderStatus { get; set; }
        public string AuditorBy { get; set; }
        public DateTime AuditorTime { get; set; }
        public string AuditorCorn { get; set; }
        public string BuyerBy { get; set; }
        public DateTime BuyerDate { get; set; }
        public string IsDelete { get; set; }
        public string CreateBy { get; set; }
        public DateTime CreateTime { get; set; }
        public string UpdateBy { get; set; }
        public DateTime UpdateTime { get; set; }
        public string Remarks { get; set; }
    }

    //进货订单界面实体
    public class OmPurchaseOrderDTO
    {
        [Key]
        public long UpOrderId { get; set; }
        public string UpOrderNo { get; set; }
        public string OrderStatus { get; set; }
        public DateTime BuyerDate { get; set; }
        public string SupplierName { get; set; }
        public string ContactPerson { get; set; }
        public string ContactPhone { get; set; }
        public string BuyerOrgName { get; set; }
        public string BuyerBy { get; set; }
        public decimal AllOrderQuantity { get; set; }
        public decimal PurchaseUnitPriceCount { get; set; }
        public string AllGoodsName { get; set; }
        public string CreateBy {  get; set; }
        public string CreateOrgName { get; set; }
        public DateTime? CreateTime { get; set; }
        public string AuditorBy { get; set; }
        public DateTime? AuditorTime { get; set; }
        public string Remarks { get; set; }
    }

    //添加订货订单实体
    public class OmPurchaseOrderForAdd
    {
        //进货订单编号
        public string UpOrderNo { get; set; }
        
        //供应商ID
        public long SupplierId { get; set; }

        //订单状态
        public string OrderStatus { get; set; }

        //进货人ID
        public long BuyerBy { get; set; }

        //创建人ID
        public long CreateBy { get; set; }

        //备注
        public string Remarks { get; set; }
    }

    //修改进货订单实体
    public class OmPurchaseOrderForUpdate
    {
        //进货订单ID
        public long UpOrderId { get; set; }
        //进货订单编号
        public string UpOrderNo { get; set; }
        //进货日期
        public DateTime BuyerDate { get; set; }
        //供应商ID
        public long SupplierId { get; set; }
        //进货人
        public long BuyerBy { get; set; }
        //进货订单备注
        public string OmPORemarks { get; set; }
        //商品编号
        public string GoodsCode { get; set; }
        //商品类型Id
        public long GoodsTypeId { get; set; }
        //商品进货单价
        public decimal PurchaseUnitPrice { get; set; }
        //商品数量
        public decimal OrderQuantity { get; set; }
        //进货明细备注
        public string OmPODRemarks { get; set; }
        //附件地址
        public string AttachmentAddress { get; set; }
    }
}
